package file_;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * 输入一个文件名，输出他的文本内容
 */
public class FileTest01 {
    public static void main(String[] args) {
        FileInputStream file = null;
        try {
            file = new FileInputStream("F:\\传奇.txt");
            byte[] a = new byte[file.available()];
            int read = file.read(a);
            String s = new String(a, 0, read);
            System.out.println(s);
            file.close();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }


}

